home *** CD-ROM | disk | FTP | other *** search
/ IRIX Base Documentation 2001 May / SGI IRIX Base Documentation 2001 May.iso / usr / share / catman / u_man / cat3 / Tcl / lsearch.z / lsearch
Encoding:
Text File  |  1998-10-30  |  2.0 KB  |  67 lines

  1.  
  2.  
  3.  
  4. llllsssseeeeaaaarrrrcccchhhh((((3333TTTTccccllll))))                                                    llllsssseeeeaaaarrrrcccchhhh((((3333TTTTccccllll))))
  5.  
  6.  
  7.  
  8. NNNNAAAAMMMMEEEE
  9.      lsearch - See if a list contains a particular element
  10.  
  11. SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
  12.      llllsssseeeeaaaarrrrcccchhhh ?_m_o_d_e? _l_i_s_t _p_a_t_t_e_r_n
  13.  
  14.  
  15. DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
  16.      This command searches the elements of _l_i_s_t to see if one of them matches
  17.      _p_a_t_t_e_r_n.  If so, the command returns the index of the first matching
  18.      element.  If not, the command returns ----1111.  The _m_o_d_e argument indicates   |
  19.      how the elements of the list are to be matched against _p_a_t_t_e_r_n and it    |
  20.      must have one of the following values:
  21.  
  22.      ----eeeexxxxaaaacccctttt
  23.           The list element must contain exactly the same string as _p_a_t_t_e_r_n.   |
  24.  
  25.      ----gggglllloooobbbb
  26.           _P_a_t_t_e_r_n is a glob-style pattern which is matched against each list  |
  27.           element using the same rules as the ssssttttrrrriiiinnnngggg mmmmaaaattttcccchhhh command.
  28.  
  29.      ----rrrreeeeggggeeeexxxxpppp
  30.           _P_a_t_t_e_r_n is treated as a regular expression and matched against each |
  31.           list element using the same rules as the rrrreeeeggggeeeexxxxpppp command.            |
  32.  
  33.      If _m_o_d_e is omitted then it defaults to ----gggglllloooobbbb.
  34.  
  35.  
  36. KKKKEEEEYYYYWWWWOOOORRRRDDDDSSSS
  37.      list, match, pattern, regular expression, search, string
  38.  
  39.  
  40.  
  41.  
  42.  
  43.  
  44.  
  45.  
  46.  
  47.  
  48.  
  49.  
  50.  
  51.  
  52.  
  53.  
  54.  
  55.  
  56.  
  57.  
  58.  
  59.  
  60.  
  61.  
  62.  
  63.                                                                         PPPPaaaaggggeeee 1111
  64.  
  65.  
  66.  
  67.